
{literal}
<script>

$(document).ready(function() { 
	var options = { 
        beforeSubmit:  showRequest,  // pre-submit callback 
        success:       showResponse  // post-submit callback 
    }; 
 
    // bind to the form's submit event 
    $('#sqlForm').submit(function() { 
    	//fakeSubmit.UpdateEditorFormValue();
        $(this).ajaxSubmit(options); 
 
        // !!! Important !!! 
        // always return false to prevent standard browser submit and page navigation 
        //checkForm();
        return false;
    });
});

// pre-submit callback 
function showRequest(formData, jqForm, options) { 
    var queryString = $.param(formData); 
    //return checkForm(); 
} 
 
// post-submit callback 
function showResponse(responseText, statusText)  { 
	//scroll(0,0);
	$('#result').html(responseText.replace(/\n/g,'<br />'));
	//window.location.reload();
}
</script>
{/literal}
<br /><br />
<pre id="result" ></pre><br /><br />
<div class="clear"></div>
<form id="sqlForm" method="post" action="/admin/do-clean-sql" >
<textarea name="dirtySQL" rows="10"></textarea>
<input type="submit" value="submit" />
</form>